const app = getApp()
Component({
  properties: {
    showBgpack:{
      type: Boolean,
      value:false
    },
    showPhonepack: {
      type: Boolean,
      value: false
    }
  },
  data: {
    showBgpack:false,
    showPhonepack:false,
  },
  methods: {
    //滑动事件
    notouch() {
      return
    },
    //取消授权窗
    cancelTip() {
      this.setData({ showBgpack: false, showPhonepack: false })
      // wx.showTabBar()
    },
    // 获取微信用户信息
    onGotUserInfo(e) {
      if (!e.detail.userInfo) {
        return
      }
      this.setData({
        showBgpack: false,
        showPhonepack: true
      })
    },
    //获取手机号
    getPhoneNumber(e) {
      let that = this
      that.setData({ showPhonepack: false});
      
      let userInfo = app.globalData.userInfo
      this.triggerEvent('emitMyevent', {userInfo})
   
    },
   
  }

})